package com.waterstudio.filedownloader.ext.m3u8.bean;

import android.support.annotation.Nullable;

import com.waterstudio.filedownloader.ext.m3u8.BuildConfig;


/**
 * m3u8切片类
 * Created by HDL on 2017/7/24.
 */

public class M3U8Ts {
    private String mUrl;
    private float mSeconds;
    private @Nullable
    EncKey mEncKey;

    public M3U8Ts(String url, float seconds) {
        this.mUrl = url;
        this.mSeconds = seconds;
    }

    public String getUrl() {
        return mUrl;
    }

    public float getSeconds() {
        return mSeconds;
    }


    @Nullable
    public EncKey getEncKey() {
        return mEncKey;
    }

    public void setEncKey(@Nullable EncKey encKey) {
        mEncKey = encKey;
    }


    @Override
    public String toString() {
        if (BuildConfig.LOG_ENABLE) {
            return "M3U8Ts{" +
                    "url='" + mUrl + '\'' +
                    ", seconds=" + mSeconds +
                    ", encrypted =" + (mEncKey != null) +
                    '}';
        } else {
            return "{" +
                    "='" + mUrl + '\'' +
                    ", =" + mSeconds +
                    ",  =" + (mEncKey != null) +
                    '}';
        }
    }
}
